import request from "@/utils/request";

/**
 *查询列表（分页）
 * @param {Object} params
 * @returns
 */
export function getListApi(params) {
  return request({
    url: "/system/message/list",
    params,
  });
}

/**
 *查询详情
 * @param {Number} id
 * @returns
 */
export function getInfoApi(id) {
  return request({
    url: `/system/message/${id}`,
  });
}

/**
 * 删除
 * @param {Number} id
 * @returns
 */
export function delApi(id) {
  return request({
    url: `/system/message/${id}`,
    method: "delete",
  });
}

/**
 * 一键已读
 * @returns
 */
export function getReadListApi() {
  return request({
    url: "/system/message/oneClickRead",
  });
}
